package mt.server;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import mt.comm.ServerComm;

public class MyServer implements MicroTraderServer {
private RunnableServer runnableServer;

	@Override
	public void start(ServerComm serverComm) {
		ExecutorService executor = Executors.newFixedThreadPool(1);
			//set global instance of serverComm
			this.runnableServer = new RunnableServer(serverComm);
			//confirmar isto
			serverComm.start();//start the server
			
			//execut runnableServer
			executor.execute(runnableServer);
		}

	}


